
if not exists (select o.name from sysobjects o, syscolumns c where o.name='Dienst' and c.name='mandid' and c.id=o.id)
begin
alter table Dienst
  add mandid char(2) not null default 'li'
print 'field ''mandid'' on table ''Dienst'': done...'
end

if not exists (select o.name from sysobjects o, syscolumns c where o.name='ArbeitsPlan' and c.name='mandid' and c.id=o.id)
begin
alter table ArbeitsPlan
  add mandid char(2) not null default 'li'
print 'field ''mandid'' on table ''ArbeitsPlan'': done...'
end